package com.blakequ.androidblemanager.utils;






import com.blakequ.androidblemanager.MyApp;

import java.io.File;

public class AppUtils {
    public static File createOrExistsDir(String dirPath) {
        return createOrExistsDir(aiyigeRootDir(), dirPath);
    }

    public static File createOrExistsDir(File parentDir, String dirPath) {
        File dir = new File(parentDir, dirPath);
        try {
            dir.mkdirs();
        } catch (Exception e) {

        }
        return dir;
    }

    public static File aiyigeRootDir() {
        File file = MyApp.getAppContext().getExternalFilesDir(null);
        if (file == null) {
            file = MyApp.getAppContext().getFilesDir();
        }
        return file;
    }


}
